<?php
if (!defined('ROOT_PATH')) die('No direct access.');
	view_header_top();
	//----------------------------------------------------------------
	$title = "Realita - Beranda";
	$content = "Realita UMKM";
	$url = HOME_URL;
	$image = IMAGE_URL."300x240.gif";	//profpic orangnya / tokonya
	$desc = "Beranda sistem RealiTA UMKM";
	$auth = "RealiTA";
	$qwords = "utama, marketplace, umkm";
	//----------------------
	echo "<title>$title</title>";
	//<!--META DATA Open Graph-->
	echo "<meta property=\"og:title\" content=\"$title\"/>";
	echo "<meta property=\"og:type\" content=\"$content\"/>";
	echo "<meta property=\"og:url\" content=\"$url\"/>";
	echo "<meta property=\"og:image\" content=\"$image\"/>";
	echo "<meta property=\"og:site_name\" content=\"RealiTA UMKM\"/>";
	echo "<meta property=\"og:description\" content=\"$desc\" />";
	//<!--META DATA FB-->
	echo "<meta property=\"fb:app_id\" content=\"147346958657510\" />";
	//<!--META DATA-->
	echo "<meta name=\"author\" content=\"$auth\" />";
	echo "<meta name=\"keywords\" content=\"$qwords\" />";
	echo "<meta name=\"description\" content=\"$desc\" />";
	echo "<meta name=\"robots\" content=\"ALL\" />";
	echo "<meta charset=\"UTF-8\" />";
	//----------------------------------------------------------------
	?>
	<style>
		/*ui-autocomplete-loading {
			background: white url("images/ui-anim_basic_16x16.gif") right center no-repeat;
		}*/
	</style>
	<script src="<?php echo ASSET_URL."nicedit/"; ?>nicEdit.js" type="text/javascript"></script>
	<script>
	/*
	//ongkir
	$(function() {
	//autocomplete untuk mencari kota asal
		$("#from").autocomplete({
			minLength: 2,
			delay: 2,
			source: function(request, response) {
				$.ajax({
					url: "ongkir/kota",
					dataType: "json",
					data: {
						term : request.term,
						from : $('#from').val(),
					},
					success: function(data) {
						response( $.map(data, function(item){
							return{
								label: item.nama_kota,
								value: item.nama_kota,
							}
						}));
					}
				});
			},
		});
	});*/
	//editor text
	bkLib.onDomLoaded(function() {
		new nicEditor({iconsPath : '<?php echo ASSET_URL.'nicedit/'; ?>nicEditorIcons.gif'}).panelInstance('area1');
	});
	</script>
	<?php
	view_header_bottom();
?>
    <!-- Content -->
      <!--div class="row">
        <div class="large-12 columns">
          <div class="row">
            <form class="custom">
				<fieldset>
					<legend>Fieldset</legend>
					<div class="row">
						<div class="large-12 columns ui-widget">
							<label for="from">Input Label</label>
							<input id="from" type="text" placeholder="kota">
						</div>
					</div>
				</fieldset>
			</form-->
	<!-- Content -->
      <!--div class="row">
        <div class="large-12 columns">
          <div class="row">
            <form class="custom" action="" method="post" enctype="multipart/form-data">
				<fieldset>
					<legend>Fieldset</legend>
					<div class="row">
						<div class="large-12 columns ui-widget">
							<label for="from">Upload</label>
							<input id="from" type="file" name="file">
						</div>
						<div class="large-12 columns ui-widget">
							<input id="from" type="submit" name="upload">
						</div>
					</div>
				</fieldset>
			</form-->
	<!-- Content -->
      <div class="row">
        <div class="large-12 columns">
          <div class="row">
            <form class="custom" action="" method="post" enctype="multipart/form-data">
				<fieldset>
					<legend>Fieldset</legend>
					<div class="row">
						<div class="large-12 columns ui-widget">
							<label for="from">Area</label>
							<textarea id="area1" name="area"></textarea>
						</div>
						<div class="large-12 columns ui-widget">
							<input id="from" type="submit" name="upload">
						</div>
					</div>
				</fieldset>
			</form>
<?php           
	//----ongkir
	/*$test = get_cost('BANDUNG','SURABAYA','1200');
	var_dump($test);*/
	//----excel
	/*if ($_POST['upload']){
		$tmp = $_FILES['file']['tmp_name'];
		$data = new Spreadsheet_Excel_Reader($tmp);
		//echo $data->dump();
		$val[0] = $data->val(2,2);
		$val[1] = $data->val(3,2);
		$val[2] = $data->val(4,2);
		$val[3] = $data->val(5,2);
		$val[4] = $data->val(6,2);
		$val[5] = $data->val(7,2);
		$val[6] = $data->val(8,2);
		var_dump($val);
	}*/
	//--editor
	if (isset($_POST['upload'])){
		$isi = htmlentities($_POST['area']);
		echo $isi;
	}
	//sendEmail('ahmad.a.s@students.itb.ac.id','test','admin','admin');
	sendEmail('ans4175@facebook.com','test','admin','admin');
	//--view
	view_footer();
?>
